package com.dufang.mybytestream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class ByteStreamDemo2 {
    public static void main(String[] args) throws IOException {
        /*
        输入字节流循环读取
         */
        //创建对象
        FileInputStream fis=new FileInputStream("\\a.txt");
        //循环读取
        int b;
        while ((b=fis.read())!=-1){
            System.out.print((char) b);
        }
        //3释放资源
        fis.close();
    }
}
